package cn.kgc.service.impl;

import cn.kgc.entities.ItemCategory;
import cn.kgc.mapper.ItemCategoryMapper;
import cn.kgc.service.ItemCategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ItemCategoryServiceImpl implements ItemCategoryService {
    @Resource
    private ItemCategoryMapper itemCategoryMapper;
    @Override
    public List<ItemCategory> getAllItemCategory() {
        return itemCategoryMapper.getAllItemCategory();
    }

    @Override
    public ItemCategory getItemCategoryById(Integer id) {
        return itemCategoryMapper.getItemCategoryById(id);
    }

    @Override
    public void addItemCategory(ItemCategory ic) {
        itemCategoryMapper.addItemCategory(ic);
    }

    @Override
    public void updateItemCategory(ItemCategory ic) {
        itemCategoryMapper.updateItemCategory(ic);
    }

    @Override
    public void deleteItemCategoryById(Integer id) {
        itemCategoryMapper.deleteItemCategoryById(id);
    }
}
